import java.util.Arrays;

public class Insert {
    public static void main(String[] args) {
        int[] arr = {10, 44, 23, 242, 111, 2, 0};
        new Insert().insert(arr);
    }
    public void insert(int[] a){
        for (int i = 1; i <a.length ; i++) {
            for (int j = i; j >0 ; j--) {
                if(a[j]<a[j-1]){
                    int t = a[j];
                    a[j] = a[j-1];
                    a[j-1] = t;
                }
            }
        }
        System.out.println(Arrays.toString(a));
    }
}
